data segment
	STUDENT_NAME	DB	30	DUP(?)
	STUDENT_ADDR	DB	9       DUP(?)
	PRINT_LINE	DB	132	DUP(?)
	STRING1		DB      'The First of - is the NO.$'
	STRING2		DB	' Character in STUDENT_ADDR$'
	STRING3		DB	'There is no - in STUDENT_ADDR$'
data ends

code segment
main proc far
	assume cs:code,ds:data,es:data

start:
	push ds
	sub ax,ax
	push ax
	mov ax,data
	mov ds,ax
	mov es,ax
	
	mov al,2dh	;2dh='-'
	lea di, STUDENT_ADDR
	mov cx,9h
	cld
	repne scasb
	jz next

	lea dx,STRING3
	mov ah,09h
	int 21h
	jmp return
next:
	mov bx,9h
	sub bx,cx
	add bx,30h
	lea dx,STRING1
	mov ah,09h
	int 21h
	mov dx,bx
	mov ah,02h
	int 21h
	lea dx,STRING2
	mov ah,09h
	int 21h
return:
	ret
main endp
code ends
	end start
